package com.youlv.yl.config;

/**
 * @author fenghe
 * @date 2022/1/2 9:54
 */
public class RedisKeyConfig {
    //验证码
    //String 类型 有效期 value 存储验证码
    /** 注册追加手机号*/
    public static final String SMS_RCODE = "yl:sms:rcode:";

    /** 对应的有效期*/
    public static final int SMS_RCODE_TIME = 600;

    /** 登陆追加手机号*/
    public static final String SMS_LCODE = "yl:sms:lcode:";

    /** 找回追加手机号*/
    public static final String SMS_FCODE = "yl:sms:fcode:";

    /**
     * 用于通过令牌获取在线的用户信息
     * 追加手机号，值存储对应的令牌*/
    public static final String USER_PHONE = "yl:auth:phone:";

    /**
     * 用于检验手机号是不是唯一登陆的
     * 追加令牌，值存储对应的用户id*/
    public static final String USER_TOKEN = "yl:auth:token:";

    /** token对应的有效期*/
    public static final int USER_TOKEN_TIME = 1800;

    /** Hash类型，记录uid对应的手机号，永久有效*/
    public static final String USER_UID_PHONE = "yl:user:id:phone";

    public static final String GEO_UCODE = "yl:user:geocode:";
    public static final String GEO_SCODE = "yl:shop:geocode:";

    /** 判断今日是否是第一次登陆状态key值*/
    public static final String IS_FIRST_LOGIN = "isFirstLogin:";

    /** 是否第一次登陆状态码设置为两天*/
    public static final int IS_FIRST_LOGIN_TIME = 172800;

    /** 存入密码错误的用户信息*/
    public static final String PASSWORD_ERROR = "yl:user:username:";

    /** 密码错误的次数*/
    public static final Long PASSWORD_ERROR_COUNT = 5L;

    /** 密码错误用户信息有效期*/
    public static final Long PASSWORD_ERROR_TIME = 86400L;

}
